import {
	getCacheOrderInfo
} from '../api/order.js'

// import {
// 	checkPayOrderInfo
// } from './orderModel.js'

//校验是否存在支付订单,callback：支付订单
// export const checkPayInfo = (info, callback) => {
// 	checkPayOrderInfo(info, callback)
// }

/**
 * callback:返回订单信息
 */
export const getCacheOrder = (key, callback) => {
	getCacheOrderInfo(key).then(res => {
		if (res.data.code == 200 && res.data.data) {
			callback(res.data.data)
		} else {
			callback("key不能为空")
		}
	}).catch(err => {
		callback(err)
	})
}